package com.ulook.lookplanet.mapper;

import com.ulook.lookplanet.bean.TTopic;
import com.ulook.lookplanet.bean.VArticlePreInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 描述：
 *
 * @author L1998
 * @date 2021/4/15
 */
@Mapper
@Repository
public interface SquareMapper {

    List<TTopic> getHotTopic();

    List<VArticlePreInfo> getSquareArticle(int userid, int itemNum);

    /**
     * 获取所有用户id
     */
    List<Integer> getAllUserIdList();

    /**
     * 获取用户的点赞过的文章id
     */
    List<String> getLikeArticleByUserId(int userId);

    /**
     * 获取用户的收藏过的文章id
     */
    List<String> getCollectArticleByUserId(int userId);

    /**
     * 获取用户的浏览过的文章id
     */
    List<String> getHistoryArticleByUserId(int userId);

    /**
     * 通过Article_Id获取
     */
    List<VArticlePreInfo> getArticleByIdList(@Param("list") List<String> list, @Param("userid") int userid);

    /**
     * 获取Article_id
     */
    List<String> getArticleIdList(int offset);

}
